#include "Wish.h"
using namespace std;

// @author A0088381W
Wish::Wish( string name, double amount, time_t  expectedDate): Entry (name, amount) {
	_expectedDate = expectedDate;
}

// @author A0088381W
Wish::Wish( string name, double amount, time_t timeOfInput, time_t expectedDate) : Entry (name, amount, timeOfInput) {
	_expectedDate = expectedDate;
}

//@author U095387X
Wish::Wish (string name, string objectString) {

	_name = name;

	istringstream instr(objectString);
	instr >> _amount >> _timeOfInput >> _expectedDate;

}

// @author A0088381W
time_t Wish::getExpectedDate() {
	return _expectedDate;
}

//@author U095387X
string Wish::serialize(){
	ostringstream outstr;

	outstr << _name << endl;
	outstr << _amount << " " << _timeOfInput << " " << _expectedDate;

	return outstr.str();
}